<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
			<link rel="stylesheet" type="text/css" href="./tpl/css/index.css"/>
				<script src="./tpl/jquery-1.7.2.min.js"></script>
	</head>
	<body>
		<?php include './tpl/header.html' ?>
		<div id="main">
			<div class="top"><a href="./index.php">首页</a><a href="./index.php?fenlei=post">发布信息</a></div>
			<div class="left post">
		<form action="" method="post">
		<li><span class="tit">标  题：</span><input type="text" name="tit" value="" /></li>
		<li><span class="tit">分  类：</span><select name="{formName1}" id="selectMainSort" onChange="showSort(this.value)">
<option value="" selected="selected">请选择</option>
<option value="便民">便民</option><option value="摄影">摄影</option><option value="学校">学校</option><option value="餐饮">餐饮</option><option value="服饰">服饰</option><option value="家装">家装</option><option value="住宿">住宿</option><option value="娱乐">娱乐</option><option value="百货">百货</option><option value="家电">家电</option><option value="美容美发">美容美发</option><option value="汽车">汽车</option><option value="医保">医保</option><option value="其它">其它</option>
</select>
<select name="{formName2}" id="selectSort">
<option value="">请选择</option>
</select>
</li>
<script language="javascript">
function showSort(cityName)
{
	var cityStr="便民,家政中心,搬家开锁,电脑家电维修,水暖电维修,送水送气,租车,快递,打字复印,运输物流,干洗擦鞋|摄影,婚纱摄影,儿童摄影|学校,补习班,培训机构,幼儿园,音乐舞蹈|餐饮,特色餐饮,绿色农家,烧烤店,火锅店,饭店,餐馆,西餐厅,快餐店,小吃|服饰,品牌店,服装店,内衣店,童装店,饰品店,鞋帽箱包|家装,五金建材,家具店,灯饰店,家居饰品,装潢材料|住宿,宾馆,招待所,客房|娱乐,旅游,网吧,酒吧,足浴水疗,瑜伽馆,KTV,养生馆,桌球城,健身房|百货,眼镜店,花店水族,化妆品,精品店,烟/酒/茶,超市,生活日杂,母婴用品,玩具店,文体用品,书店音像,乐器工艺品,佛教用品|家电,手机通讯,电脑数码,家电商场,维修|美容美发,美容院,美发美甲,减肥中心,SPA馆|汽车,机动车,非机动车,修配厂,轮胎店,汽车美容|医保,医院,诊所,药店,保健品,医疗器械|其它,广告制作,矿山设备,设备租用,畜牧养殖,其它"
	var city=cityStr.split("|")
	selectBorough=document.getElementById("selectSort")
	if(cityName!=""){
		for(i=0;i<city.length;i++){
			selectBorough.style.width="0px"
			selectBorough.style.width="auto"
			arrayBorough=city[i].split(",")
			if(arrayBorough[0]==cityName){
				selectBoroughLangth=selectBorough.options.length
				/*删除地区的所有值*/
				for(t=0;t<selectBoroughLangth;t++){
					selectBorough.remove(0)
				}
				for(t=1;t<arrayBorough.length;t++){
					boroughOption=document.createElement("option")
					boroughOption.appendChild(document.createTextNode(arrayBorough[t]))
					boroughOption.setAttribute("value", arrayBorough[t]);
					selectBorough.appendChild(boroughOption)
				}
			}
		}
		
	}
	else{
		selectBoroughLangth=selectBorough.options.length
		/*删除地区的所有值*/
		for(t=0;t<selectBoroughLangth;t++){
			selectBorough.remove(0)
		}
		boroughOption=document.createElement("option")
		boroughOption.appendChild(document.createTextNode("请选择"))
		boroughOption.setAttribute("value", "")
		selectBorough.appendChild(boroughOption)
	}
}
</script>
		<li><span class="tit">联系人: </span><input type="text" name="linkman"  value="" /></li>
		<li><span class="tit">电    话:</span><input type="text" name="tel"  value="" /><br /></li>
		<li><span class="tit">手    机:</span><input type="text" name="moblie"  value="" /><br /></li>
		<li><span class="tit">Q    Q: </span><input type="text" name="QQ"  value="" /><br /></li>
		<li><span class="tit">地     址: </span><input type="text" name="address"  value="" /><br /></li>
		<li><span class="tit">内容：</span></li><textarea name="cont" rows="5" cols="40"></textarea>
		<input type="hidden" name="time" value="<?php echo date('Y-m-d H:i:s'); ?>" />
		<li><span class="tit">验证码:</span><input type="text" value="" name="ImgCode" /><img src="./ImgCode.class.php" class="refreshCode" alt="图片验证码" /></li>
		<li></li><input type="submit" name="" id="" value="提交" /></li>
		</form>
		</div>
				<div class="right"></div>
			</div>
		<script>
			$(function(){
				$('.refreshCode').click(function() {
					$nums =Math.floor(Math.random()*1000);
					$('.refreshCode').attr('src','./ImgCode.class.php?id='+$nums);
				});
			})
		</script>
	</body>
</html>
